package com.tang.auth.common.enums;


import lombok.Getter;

@Getter
public enum AuthUserStatusEnum {
    OPEN(0, "启用"),
    CLOSE(1, "禁用");

    AuthUserStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private final Integer code;
    private final String desc;

    public static AuthUserStatusEnum of(Integer status) {
        if(status <= 0) {
            return OPEN;
        }
        return CLOSE;
    }
}
